From c1bf9f3b412c57badea496106103ba050f2ad229 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Sep 2020 13:40:10 -0400 Subject: [PATCH] layoutmanager demo: Make icons come out upright Rearrange the vertices so that the icons show up in the proper orientation. --- demos/gtk-demo/demo2layout.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demos/gtk-demo/demo2layout.c b/demos/gtk-demo/demo2layout.c index fb0dc5a9f8..ca5475d1a5 100644 --- a/demos/gtk-demo/demo2layout.c +++ b/demos/gtk-demo/demo2layout.c @@ -106,10 +106,10 @@ demo2_layout_allocate (GtkLayoutManager *layout_manager, gtk_widget_set_child_visible (child, FALSE); - graphene_point3d_init (&p1, 0., 0., 1.); + graphene_point3d_init (&p1, w, h, 1.); graphene_point3d_init (&p2, w, 0., 1.); - graphene_point3d_init (&p3, 0., h, 1.); - graphene_point3d_init (&p4, w, h, 1.); + graphene_point3d_init (&p3, 0., 0., 1.); + graphene_point3d_init (&p4, 0., h, 1.); t_1 = RADIANS (map_offset (offset + 10 * j)); t_2 = RADIANS (map_offset (offset + 10 * (j + 1))); @@ -129,8 +129,8 @@ demo2_layout_allocate (GtkLayoutManager *layout_manager, graphene_point3d_init (&q1, x0 + SX (r, t_1, p_1), y0 + SY (r, t_1, p_1), SZ (r, t_1, p_1)); graphene_point3d_init (&q2, x0 + SX (r, t_2, p_1), y0 + SY (r, t_2, p_1), SZ (r, t_2, p_1)); - graphene_point3d_init (&q3, x0 + SX (r, t_1, p_2), y0 + SY (r, t_1, p_2), SZ (r, t_1, p_2)); - graphene_point3d_init (&q4, x0 + SX (r, t_2, p_2), y0 + SY (r, t_2, p_2), SZ (r, t_2, p_2)); + graphene_point3d_init (&q3, x0 + SX (r, t_2, p_2), y0 + SY (r, t_2, p_2), SZ (r, t_2, p_2)); + graphene_point3d_init (&q4, x0 + SX (r, t_1, p_2), y0 + SY (r, t_1, p_2), SZ (r, t_1, p_2)); /* Get a matrix that moves p1 -> q1, p2 -> q2, ... */ perspective_3d (&p1, &p2, &p3, &p4, -- 2.30.2